<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //面向对象思想
        //表现力的JSON对象字面量
        //这是一个对象字面量
        //let变量 关键字（保留字）
        // key:value模式
        //typeof  object
    let zzp={
        name:'yanggming',//字符串
        hometown:'上饶',//字符串
        age:'18',//number，b's
        sex:'男',//字符串
        hobbies:['学习','乒乓球'],//对象
        isSingle: true,//布尔
        job:null,
        sendFlower: function(target){
            target.reserveFlower(zzp);
        }
    }
    let a;
    let xs = {
        xq:30,
        name: '小美',
        hometown:'赣州',
        reserveFlower :function(sender){
            console.log('xs收到了'+sender.name+'哈哈哈')
            if(this.xq<60){
                console.log('hhh');
            }else{
                console.log('nnn');
            }
        }
    }
    let xh={
        name:'小红',
        hometown:'上饶',
        reserveFlower :function(sender){
            setTimeout(function(){
                xs.xq=100;
                xs.reserveFlower(sender);
            },3000)
            // console.log('xh收到了'+sender.name+'哈哈哈')
            // xs.reserveFlower(sender);
            //作用
            // if(xs.xq>=50){
            //     console.log('哈哈哈')
            // }
        }
    }            
    </script>
</body>
</html>